package ui;

import com.sun.lwuit.Container;
import com.sun.lwuit.Graphics;
import com.sun.lwuit.Painter;
import com.sun.lwuit.geom.Rectangle;

/**
 *
 * @author Shayan
 */
public class ColoredBox extends Container {

    public ColoredBox(final int color) {
        getStyle().setBgPainter(new Painter() {
            public void paint(Graphics g, Rectangle rect) {
                g.setColor(color);
                g.setAlpha(100);
                g.fillRect(rect.getX(), rect.getY(), rect.getSize().getWidth(), rect.getSize().getHeight());
            }
        });
    }
}
